﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;



namespace Sub.Function
{
    [DataContract]
    public class ActionResult
    {
        bool _Error;
        /// <summary>
        /// If this action is error, the property return true else return false
        /// </summary>
        [DataMember]
        public bool Error
        {
            get
            {
                return _Error;
            }
            set
            {
                _Error = value;
            }
        }
        Sub.Function.EnumType.eErrorType _errorType;
        /// <summary>
        /// Referred when error occur
        /// </summary>
        [DataMember]
        public Sub.Function.EnumType.eErrorType ErrorType
        { get { return _errorType; } set { _errorType = value; } }
        string _fields;
        /// <summary>
        /// Data field raise error
        /// </summary>
        [DataMember]
        public string Fields
        {
            get
            {
                return _fields;
            }
            set
            {
                _fields = value;
            }
        }
        string _code;
        [DataMember]
        public string Code
        {
            get
            {
                return _code;
            }
            set
            {
                _code = value;
            }
        }

        public object ActiveControl { get; set; }
        [DataMember]
        public string SQL { get; set; }
        [DataMember]
        public string IndexName { get; set; }
    }
}
